import { getAction, deleteAction, putAction, putparamsAction, postAction, httpAction } from '@/api/manage'
//  BOM信息
// const getAllGoodsBaseInfo = (params)=>getAction("/wms/goods/getAllGoodsBaseInfo",params); // 物料下拉
// const messBomInfoAdd = (params)=>postAction("/mess/bomInfo/add",params); // 新建
// const messBomInfoEdit = (params)=>putAction("/mess/bomInfo/edit",params); // 编辑
// const messBomInfoList = (params)=>getAction("/mess/bomInfo/list",params); // 列表
// const messBomInfoQueryById = (params)=>getAction(`/mess/bomInfo/queryById?id=${params}`); // 详情
// const messBomInfoQueryDelete = (params)=>deleteAction(`/mess/bomInfo/delete?id=${params}`); // 删除BOM
// const checkInfoByGoodsId = (params)=>getAction("/mess/bomInfo/checkInfoByGoodsId",params); // 校验主物料
// const checkDetailByGoodsId = (params)=>getAction("/mess/bomInfo/checkDetailByGoodsId",params); // 校验子物料
// const queryBomListByBomId = (params)=>getAction("/mess/bomInfo/queryBomListByBomIdOrGoodsId/",params); // 获取BOM下的物料信息
// const bomInfoDeleteBatch = (params)=>deleteAction(`/mess/bomInfo/deleteBatch?ids=${params}`); // 批量删除
// 仓库管理
const wmsWarehouseList = (params) => getAction('/wms/wmsWarehouse/list', params) // 列表
const wmsWarehouseGetTypeList = (params) => getAction('/wms/wmsWarehouse/getTypeList', params) // 仓库分类下拉
const wmsWarehouseAdd = (params) => postAction('/wms/wmsWarehouse/add', params) // 新建
const wmsWarehouseDelete = (params) => deleteAction(`/wms/wmsWarehouse/delete?id=${params}`) // 删除
const wmsWarehouseEdit = (params) => putAction('/wms/wmsWarehouse/edit', params) // 编辑
const wmsWarehouseQueryById = (params) => getAction(`/wms/wmsWarehouse/queryById?id=${params}`) // 详情

// 客户管理
const erpCustomerList = (params) => getAction('/salemgt/erpCustomer/list', params) // 列表
// const wmsWarehouseGetTypeList = (params) => getAction('/wms/wmsWarehouse/getTypeList', params) // 仓库分类下拉
const erpCustomerAdd = (params) => postAction('/salemgt/erpCustomer/add', params) // 新建
const erpCustomerDelete = (params) => deleteAction(`/salemgt/erpCustomer/delete?id=${params}`) // 删除
const erpCustomerEdit = (params) => putAction('/salemgt/erpCustomer/edit', params) // 编辑
const erpCustomerQueryById = (params) => getAction(`/salemgt/erpCustomer/queryById?id=${params}`) // 详情

const operateRevoke = (params) => putAction('/proc/operate/revoke', params) // 撤回


// 销售订单物品明细
const saleOrderDetail = (params) => getAction(`/jksaas-produce/produce/sale/saleOrderDetail/list?orderId=${params}`) // 详情
// 生产工单列表
const produceOrderInfoList = (params) => postAction(`/jksaas-produce/produce/produceorder/produceOrderInfo/list`,params)

// 任务详情报工信息
const produceOrderReportWork = (params) => getAction(`/jksaas-produce/produce/reportwork/produceOrderReportWork/workbench`,params) // 详情

// 申请采购
const erpPurchaseTaskApplyAdd = (params) => postAction('/purchasemgt/erpPurchaseTaskApply/add', params) // 新建
const erpPurchaseTaskApplyQueryById = (params) => getAction(`/purchasemgt/erpPurchaseTaskApply/queryById?id=${params}`) // 详情


// 申请发货
const selectCustomerList = (params) => getAction('/salemgt/erpShippingApply/selectCustomerList', params) // 下拉-查询客户
const erpShippingApplySelectByUserId = (params) =>
  getAction(`/salemgt/erpShippingApply/selectByUserId?customerId=${params}`) // 查询合同
const findShippingItem = (params) => getAction(`/salemgt/erpShippingApply/findShippingItem?contractId=${params}`) // 表格明细
const erpShippingApplyAdd = (params) => postAction('/salemgt/erpShippingApply/add', params) // 新建

const shippingDetail = (params) => getAction(`/salemgt/erpShippingApply/shippingDetail?applyNo=${params}`) // 详情


// 库存管理 仓库水位设置
const wmsGoodsWaterLevelList = (params) => getAction('/wms/wmsGoodsWaterLevel/list', params) // 列表
const getWmsWaterhouseTree = (params) => getAction('/wms/wmsWarehouse/getWmsWaterhouse', params) // 树查询
const wmsGoodsWaterLevelAdd = (params) => postAction('/wms/wmsGoodsWaterLevel/add', params) // 新建
const wmsGoodsWaterLevelEdit = (params) => putAction('/wms/wmsGoodsWaterLevel/edit', params) // 编辑
const warehouseInventoryGetStatusList = (params) => getAction('/wms/wmsWarehouseInventory/getStatusList', params) // 仓库物资盘点管理-仓库盘点状态下拉列表

// 库存盘点
const warehouseInventoryGetTypeList = (params) => getAction('/wms/wmsWarehouseInventory/getTypeList', params) // 仓库物资盘点管理-仓库盘点类型下拉列表
const wmsWarehouseQueryList = (params) => getAction('/wms/wmsWarehouse/queryList', params) // 仓库物资盘点管理-仓库下拉
const getWmsInventoryInfo = (params) => getAction(`/wms/wmsWarehouseInventory/getWmsInventoryInfo?id=${params}`) // 仓库物资盘点管理-通过盘点ID仓库物资盘点明细查询
const getGoodsListByWarehouseId = (params) => getAction('/wms/wmsWarehouse/getGoodsListByWarehouseId', params) // 仓库物资管理-新建盘点选择仓库查询物资列表
const wmsWarehouseInventoryAdd = (params) => postAction('/wms/wmsWarehouseInventory/add', params) // 新建
const wmsWarehouseInventoryEdit = (params) => putAction('/wms/wmsWarehouseInventory/edit', params) // 编辑
const wmsWarehouseInventoryUpdateStatus = (params) => putAction('/wms/wmsWarehouseInventory/updateStatus', params) // 盘点完毕
const warehouseInventoryGetContinueInventoryInfo = (params) => getAction(`/wms/wmsWarehouseInventory/getContinueInventoryInfo?id=${params}`) // 继续盘点 查上面基本信息
const warehouseInventoryUnCompleteList = (params) => getAction('/wms/wmsWarehouseInventory/unCompleteList', params) // 列表 继续盘点 待盘点数据接口
const wmsWarehouseInventoryCompleteList = (params) => getAction('/wms/wmsWarehouseInventory/completeList', params) // 列表 继续盘点 未盘点数据接口
const getWmsInventoryGoodsList = (params) => getAction('/wms/wmsWarehouseInventory/getWmsInventoryGoodsList', params) // 列表 详情 表格 接口


export const wareHouseApi = {
  wmsWarehouseList,
  wmsWarehouseGetTypeList,
  wmsWarehouseAdd,
  wmsWarehouseDelete,
  wmsWarehouseEdit,
  erpCustomerList,
  erpCustomerAdd,
  erpCustomerDelete,
  erpCustomerEdit,
  erpCustomerQueryById,
  operateRevoke,
  erpPurchaseTaskApplyAdd,
  selectCustomerList,
  erpShippingApplySelectByUserId,
  findShippingItem,
  erpShippingApplyAdd,
  wmsGoodsWaterLevelList,
  wmsGoodsWaterLevelAdd,
  getWmsWaterhouseTree,
  wmsGoodsWaterLevelEdit,
  warehouseInventoryGetTypeList,
  warehouseInventoryGetStatusList,
  wmsWarehouseQueryList,
  getWmsInventoryInfo,
  getGoodsListByWarehouseId,
  wmsWarehouseInventoryAdd,
  wmsWarehouseInventoryEdit,
  wmsWarehouseQueryById,
  warehouseInventoryGetContinueInventoryInfo,
  warehouseInventoryUnCompleteList,
  wmsWarehouseInventoryCompleteList,
  getWmsInventoryGoodsList,
  erpPurchaseTaskApplyQueryById,
  shippingDetail,
  wmsWarehouseInventoryUpdateStatus,
  saleOrderDetail,
  produceOrderInfoList,
  produceOrderReportWork,
}
